package a704;

class Solution {
    public static void main(String[] args) {
        int[] nums = new int[]{-1,0,3,5,9,12};
        int target = 9;
        System.out.println(new Solution().search(nums,target));;
    }

    public int search(int[] nums, int target) {
        for (int i = 0; i < nums.length; i++) {
            int num = nums[i];
            if(num== target){
                return i;
            }
        }
        return -1;
    }
}
